using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using VOL.Entity.DomainModels;

namespace VOL.demo.IServices
{
    public partial interface IPurchaseOrderItemModelService
    {
        /// <summary>
        /// 根据进货单号获取明细列表
        /// </summary>
        /// <param name="orderCode">进货单号</param>
        /// <returns>明细列表</returns>
        Task<List<PurchaseOrderItemModel>> GetItemsByOrderCodeAsync(string orderCode);

        /// <summary>
        /// 批量添加进货明细
        /// </summary>
        /// <param name="items">明细列表</param>
        /// <returns>是否成功</returns>
        Task<bool> AddItemsAsync(List<PurchaseOrderItemModel> items);

        /// <summary>
        /// 根据进货单号删除明细
        /// </summary>
        /// <param name="orderCode">进货单号</param>
        /// <returns>是否成功</returns>
        Task<bool> DeleteItemsByOrderCodeAsync(string orderCode);

        /// <summary>
        /// 更新明细项
        /// </summary>
        /// <param name="item">明细项</param>
        /// <returns>是否成功</returns>
        Task<bool> UpdateItemAsync(PurchaseOrderItemModel item);
    }
}
